Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 5 - Bitmap Shapes / Bitmap Shapes Reference
Functions / Drawing Bitmaps


GXDrawBitmap

You can use the GXDrawBitmap function to draw a bitmap without encapsulating the bitmap geometry in a bitmap shape.

void GXDrawBitmap(const gxBitmap *data, const gxPoint *position);
data
A pointer to a gxBitmap structure that specifies information about the bitmap you want to draw.
position
A pointer to a gxPoint structure which indicates the position to draw the bitmap.
DESCRIPTION
The GXDrawBitmap function allows you to draw a bitmap without having to create a bitmap shape yourself. Instead, you create a gxBitmap structure specifying the bitmap you want to draw and a gxPoint structure indicating the position of the bitmap, and then you pass a pointer to these structures in the data and position parameters, respectively.

The GXDrawBitmap function calls the GXNewBitmap function to create a temporary bitmap shape using the values specified in these structures and the style, ink and transform of the default bitmap shape. Then the GXDrawBitmap function draws the bitmap shape using the GXDrawShape function.

For information about how QuickDraw GX creates bitmap shapes using the values you provide in the fields of the gxBitmap structure, see the description of the GXNewBitmap function on page 5-66.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
parameter_is_nil 
size_of_bitmap_exceeds_implementation_limit 
parameter_is_nil(debugging version)
invalid_pixelSize(debugging version)
bitmap_height_negative(debugging version)
bitmap_width_negative(debugging version)
bitmap_height_negative(debugging version)
bitmap_rowBytes_negative(debugging version)
bitmap_rowBytes_too_small(debugging version)
bitmap_rowBytes_not_aligned(debugging version)
bitmap_ptr_not_aligned(debugging version)
bitmap_rowBytes_must_be_specified_for_user_image_buffer
 (debugging version)
colorSpace_out_of_range(debugging version)
Warnings 
shape_access_not_allowed(debugging version)
SEE ALSO
For examples of this function, see "Creating Black-and-White Bitmaps" beginning on page 5-15.

For information about the gxBitmap structure, see "The Bitmap Geometry Structure" beginning on page 5-62.

To encapsulate a bitmap geometry in a bitmap shape, use the GXNewBitmap function, which is described on page 5-66.

To draw a bitmap once you've encapsulated it in a bitmap shape, use the GXDrawShape function, which is described in the "Shape Objects" chapter of Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help